<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'returnGoods.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link rel="stylesheet" href="jquery-easyui-1.4.2/themes/gray/easyui.css">
	<link rel="stylesheet" href="jquery-easyui-1.4.2/themes/icon.css">
	<link rel="stylesheet" href="css/style.css">
	<script src="jquery-easyui-1.4.2/jquery.min.js"></script>
	<script src="jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
	<script src="jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
	<script src="js/returnGoods.js"></script>
	<style type="text/css">
		fieldset {
	    	border-radius:3px;
	    	border:1px #ccc solid;
	    }
		input {
			border:solid 1px #ccc;
			border-radius:5px;
		}
		* {
			font-family:Microsoft YaHei;
		}
		/*表格行高*/
		.datagrid-row {
	        height: 42px;
	    }
	    /*表格行样式*/
        .datagrid-row td div {
        	font-size:18px;
        	font-family:Microsoft YaHei;
        	color:black;
        }
        #goods_dialog .datagrid-row {
        	height: 36px;
        }


	</style>
  </head>
  
  <body style="margin-bottom:0;font-family:Microsoft YaHei;">
  	<div style="width:100%;height:100%;padding:0;overflow:hidden;color:#333;">
  		<div style="margin:0;padding-bottom:8px;font-size:14px;">
  			<fieldset id="" style="padding:6px;margin:0;">
	  			<div style="float:left;margin:0 30px 0 0;padding-bottom:10px;">
	    			<span>小票流水号:</span>
	    			<input id="orderid" class="easyui-textbox" style="width:180px;height:25px;"
	    				data-options="buttonText:'搜索'"/>
	    		</div>
	  			<div style="float:left;margin:0;padding-right:10px;">
	    			<span>退货单号:</span>
	    			<input id="returnGoodsId" name="id" 
	    				style="width:150px;height:25px;" />
	    		</div>
	  			<div style="float:left;margin:0;padding-right:10px;">
	    			<span>会员号:</span>
	    			<input id="customerId" name="customerId" readonly
	    				style="width:80px;height:25px;" />
	    		</div>
	  			<div style="float:left;margin:0;padding-right:10px;">
	    			<span>折扣:</span>
	    			<input id="discount" name="discount" readonly
	    				style="width:80px;height:25px;" />
	    		</div>
	  			<div style="float:left;margin:0;padding-right:10px;">
	    			<span>经手人:</span>
	    			<input id="uesrname" name="" value=<s:property value="#session['user'].name"/> class="easyui-textbox" data-options="editable:false"
	    				style="width:80px;height:25px;" />
	    			<input type="hidden" value=<s:property value="#session['user'].id"/> id="cashierId" >
	    		</div>
	  		</fieldset>
  		</div>
  		
  		<!-- 退货商品表格 -->
  		<div style="height:380px;width:100%;margin-top:0;" id="">
  			<table id="return_grid"></table>
  		</div>
  		
  		<div style="margin-top:5px;padding-bottom:8px;font-size:18px;">
	  		<fieldset style="padding:6px;margin:0;height:60px;">
	  			<div style="float:left">
	  				<span>扣除积分：</span>
	  				<input type="text" readonly id="integral"  value="0" 
							style="border:none;width:100px;font-size:34px;">
	  			</div>
	  			<div style="float:left">
	  				<span>退货数量：</span>
	  				<input type="text" readonly id="amount"  value="0" 
							style="border:none;width:60px;font-size:34px;">
	  			</div>
	  			<div style="float:left">
	  				<span>退款金额（折后）：</span>
	  				<input type="text" readonly id="totalprice"  value="0.0" 
							style="border:none;width:150px;font-size:34px;color:#e63a31">
	  			</div>
	  			<div style="float:left">
	  				<div style="font-size:14px;"><input type="checkbox" checked="checked" name="" />退现金</div>
	  				<div style="font-size:14px;"><input type="checkbox" checked="checked" id="outputReturnReceipt" />打印退货单</div>
	  			</div>
	  			<div style="float:left;margin-left:50px;">
	  				<a href="javascript:void(0)" class="myButton" id="returnGoods" style="float:left;margin:5px;">退货</a>	
	  				<a href="javascript:void(0)" class="myButton" id="resetForm" style="float:left;margin:5px;">清空</a>
	  			</div>
	  				
	  		</fieldset>
  		</div>
  		
  		
  	</div>
  	
  	<!-- 选择商品对话框 -->
  	<div id="goods_dialog">
  		<div style="height:400px;width:820px;margin-top:0;">
  			<div style="margin:10px;font-size:16px;">
  				原支付单号：
  				<input id="paymentId" type="text" readonly style="border:0;font-size:16px;" />
  			</div>
  			<!-- 原销售单商品表格 -->
  			<table id="goods_grid"></table>
  		</div>
  		
  		<div id="setAmount_dialog">
  			<div style="margin:20px 40px;font-size:16px;">
  				<span>商品条码：</span>
  				<input readonly id="returnGoodId" style="font-size:18px;" />
  			</div>
  			<div style="margin:20px 40px;font-size:16px;">
  				<span>退货商品：</span>
  				<input readonly id="returnGood" style="font-size:18px;" />
  			</div>
  			<div style="margin:20px 40px;font-size:16px;">
  				<span>退货数量：</span>
  				<select name="" id="selectAmount" style="font-size:18px;width:60px;">
				</select>
  			</div>
  			<div style="margin:20px 40px;font-size:16px;">
  				<span>退货原因：</span>
  				<select name="reason" id="reason" style="font-size:14px;width:200px;">
  					<option value="商品出现质量问题">商品出现质量问题</option>
  					<option value="商品包装存在异常问题">商品包装存在异常问题</option>
  					<option value="购买时商品已过期">购买时商品已过期</option>
  					<option value="">其它原因</option>
				</select>
  				
  			</div>
  			<div style="margin:20px 40px;font-size:16px;" id="otherReason_div">
  				<span>其它原因：</span>
  				<textarea id="otherReason" placeholder="选择其它原因时请填写" style="font-size:14px;width:200px;height:60px;"></textarea>
  			</div>
  		</div>
  	</div>
  	
  	<!-- 退货单小票 -->
    <div id="return_receipt_dialog" style="font-size:14px;padding:0 5px;">
    	<!-- <div style="text-align:center;font-size:18px;margin:6px;">Dainty-Bits</div> -->
    	<div style="text-align:center;font-size:18px;margin:6px;">退货单</div>
    	<div>退货单号：<span id="r_returnId"></span></div>
    	<div>经手人：<span id="r_user"></span></div>
    	<div style="text-align:center;">-----------------------------------------------------</div>
    	<div>
    		<table id="return_receipt_table" style="font-size:14px;"></table>
    	</div>
    	
    	<div style="text-align:center;">-----------------------------------------------------</div>
    	<table style="font-size:14px;">
    		<tr>
    			<td><div>会员：<span id="r_customer"></span></div></td>
    			<td><div>合计金额：<span id="r_totalprice"></span></div></td>
    		</tr>
    		<tr>
    			<td><div style="width:150px;">折扣：<span id="r_discount"></span></div></td>
    			<td><div id="d_integral">扣除积分：<span id="r_integral"></span></div></td>
    		</tr>
    		<tr>
    			<td><div>退货数量：<span id="r_amount"></span></div></td>
    		</tr>
    		<tr>
    			<td><div>退款金额（折后）：<span id="r_returnprice"></span></div></td>
    		</tr>
    	</table>
    	
    	<div>&nbsp;交易时间：<span id="r_time"></span></div>
    	<div style="text-align:center;">-----------------------------------------------------</div>
    	<div>欢迎光临Dainty-Bits！</div>
    	<div>请妥善保留退货单以便查核</div>
    	<div>多谢惠顾，欢迎再次光临</div>
    	<br />
    </div>
  	
  </body>
</html>
